package com.alks.yn_zs.data.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.util.List;

/**
 * @author: chen
 * @date: 2024/11/22
 * @description: 出入库统计DTO
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class InOutStatisticVO {

    private DataItem daily;

    private DataItem Monthly;

    private List<TimeData> recently;

    @Data
    public static class TimeData {

        @ApiModelProperty(value = "日期")
        @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
        private LocalDate date;

        @ApiModelProperty(value = "星期")
        private String week;

        @ApiModelProperty(value = "星期-中文")
        private String weekCn;

        @ApiModelProperty(value = "出入库数据")
        private DataItem data;
    }

    @Data
    @ApiModel(value = "库存数据")
    public static class DataItem {

        public DataItem(Long in, Long out) {
            this.in = in;
            this.out = out;
        }

        @ApiModelProperty(value = "入库数量")
        private Long in;

        @ApiModelProperty(value = "出库数量")
        private Long out;

        @ApiModelProperty(value = "库存数量")
        private Long store;
    }
}
